<?php $this->start('menu') ?>
	<?php echo $this->element('menu', 
														array("str_item" => "contact")); ?>
<?php $this->end() ?>
<div id="content">
	<div id="products">
		<?php foreach($products as $product){ ?>
		<div class="pro-item">
			<?php $master = $this->Variants->getMasterVariant($product['Product']['id']) ?>
			<a href="#"><?php echo $this->Images->showMedium($master['Image'][0]) ?></a>
			<h2><a href="index.html"><?php echo $product['Product']['name'] ?></a></h2>
			<p><?php echo $product['Product']['short_desc'] ?></p>
			<a class="more" href="index.html">Read more</a>
		</div>
		<?php } ?>
	</div><!-- end #product -->
	<div id="news">
		<div class="main-news">
		<?php if(isset($mainPost)){ ?>
			<a href="#"><?php echo $this->Posts->thumbBig($mainPost) ?></a>
			<h1><?php echo $mainPost['Post']['title'] ?></h1>
			<p class='pcontent'><?php echo $mainPost['Post']['description'] ?></p>
		<?php } ?>
		</div>
		<div class="random-news">
			<?php foreach($randPosts as $post){ ?>
			<div class="news-item">		
				<a href="#"><?php echo $this->Posts->thumbMedium($post) ?></a>
				<h2><?php echo $post['Post']['title'] ?></h2>
			</div>
			<?php } ?>
		</div>
	</div><!-- end #news -->
	<div id="feature" >
		<div class="theme-default" style="width: 960px; margin-left: 14px;">
			<?php if($slider['Slider']['slide'] == true){ ?>
			<div id="slider_<?php echo $slider['Slider']['id'] ?>" class="slider"> 
				<?php foreach($slider['Image'] as $i => $img){?>
					<?php echo $this->Html->link($this->Images->showSlider($img), array('controller' => 'Roses','action' => 'index'),array('escape' => false)) ?>
				<?php } ?>
			</div>
			<?php } ?>
		</div>
	</div><!-- end Feature -->
</div><!-- end Content -->

<?php $this->start('script') ?>
	<?php echo $this->Html->script('jquery.nivo.slider'); ?>
<?php $this->end() ?>

<?php $this->start('css') ?>
	<?php echo $this->Html->css('nivo-slider/nivo-slider'); ?>
	<?php echo $this->Html->css('nivo-slider/default'); ?>
<?php $this->end() ?>

<script type='text/javascript'>
	$(document).ready(function() {		
		$('.slider').nivoSlider({effect: 'random', pauseTime: 10000, });
	});
</script>
